﻿<Window x:Class="Blackbird.Studio.Control.ImageGridDesignWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ImageGridDesignWindow"
        xmlns:ctrl="clr-namespace:Blackbird.Studio.Control"
        DataContext="{Binding Source={StaticResource ResourceKey=StaticImageGridViewModel}, Path=Instance}">
    <Window.Resources>
        <Style x:Key="ImageGridBorderStyle" TargetType="Border">

        </Style>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Style="{StaticResource ImageGridBorderStyle}" Grid.Row="0" >            
            <ctrl:ImageGrid
                x:Name="MapImageGrid" 
                ImageSources="{Binding Path=Model.Tiles}" 
                CellWidth="{Binding Path=Model.CellWidth}"
                CellHeight="{Binding Path=Model.CellHeight}" 
                MapWidth="{Binding Path=Model.Width}" 
                MapHeight="{Binding Path=Model.Height}"
                Zoom="{Binding Path=Model.Zoom}"/>
        </Border>
        <Border Grid.Row="1" Style="{StaticResource ToolsBorderStyle}" >
            <StackPanel >
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                    <Button Content="Grow" Command="{Binding Path=GrowCommand}" Style="{StaticResource PaperButtonStyle}" />
                    <Button Content="Shrink" Command="{Binding Path=ShrinkCommand}" Style="{StaticResource PaperButtonStyle}"  />
                </StackPanel>
                <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
                    <Button Content="Zoom In" Command="{Binding Path=ZoomInCommand}" Style="{StaticResource PaperButtonStyle}" />
                    <Button Content="Zoom Out" Command="{Binding Path=ZoomOutCommand}" Style="{StaticResource PaperButtonStyle}"  />
                </StackPanel>
            </StackPanel>
        </Border>
    </Grid>
</Window>
